package tech.jabari.user.dao.impl;

import org.springframework.beans.BeanWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import tech.jabari.user.dao.UserDao;
import tech.jabari.user.entity.User;
import tech.jabari.utils.JdbcUtil;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Jabari Lu
 * @title: UserDaoImpl
 * @data 2020/8/4 14:25
 */
@Repository
public class UserDaoImpl implements UserDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;


    /**
     * 根据id数组批量删除用户
     * @param delIds - String - 格式： 1,2,3
     * @return
     */
    @Override
    public Integer batchDeleteUser(String delIds) {
        String sql = "delete from t_user where id in ("+delIds+")";
        int r = jdbcTemplate.update(sql);
        return r;
    }


}
